Mapping Functions

Mapping functions are used to apply two-dimensional textures to surfaces. Each mapping functions defines a different method of transforming a three dimensional point of intersection to a two dimensional u - v pair termed texturing coordinates. Typically, the arguments to a mapping method define a center of a projection and two non-parallel axes that define a local coordinate system.

The default mapping method is termed u - v mapping or inverse mapping. Normally, there is a different inverse mapping method for each primitive type (see chapter 5). When inverse mapping is used, the point of intersection is passed to the uv method for the primitive that was hit.


\begin{defkey}{map}{{\tt uv}}
Use the $uv$\ (inverse mapping) method associated...
...sected in order to map from 3D to determine
texturing coordinates.
\end{defkey}
The inverse mapping method for each primitive is described in Chapter 5.


\begin{defkey}{map}{{\tt planar} [\evec{origin} \evec{vaxis} \evec{uaxis}]}
Use...
...v$\ axes, with
the (0,0) in texture space mapped to \evec{origin}.
\end{defkey}


\begin{defkey}{map}{{\tt cylindrical} [\evec{origin} \evec{vaxis} \evec{uaxis}]}...
...cylinder's axis, and \evec{uaxis} defines
where $u=0$\ is located.
\end{defkey}
See the description of the inverse mapping method for the cylinder in Chapter 5. By default, the point of intersection is projected onto a cylinder that runs through the origin along the z axis, with uaxis equal to the x axis.


\begin{defkey}{map}{{\tt spherical} [\evec{origin} \evec{vaxis} \evec{uaxis}]}
...
...evec{uaxis} intersects the sphere
defines where $u=0$\ is located.
\end{defkey}
By default, a spherical mapping projects points towards the origin, with vaxis defined to be the z axis and uaxis defined to be the x axis.